/**
 * Mar 27, 2008
 */
package audioreaper.pattern;

import audioreaper.tools.Tone;

/**
 * <code>KeyOp</code>.
 *
 * @author <a href="vincent@nazarene.nl">Vincent van Beveren</a>
 *
 */
public class KeyOp {

	public static final int DAMPEN = 0;
	public static final int MAX_LEVEL = 1024;
	
	private int _note;
	private int _level;
	
	
	public KeyOp(int note, int level) {
		if (_note < Tone.MIN_NOTE || _note > Tone.MAX_NOTE) {
			throw new IllegalArgumentException("Note out of range");			
		}
		if (level < DAMPEN || level > MAX_LEVEL) {
			throw new IllegalArgumentException("Level out of range");
		}
			
		_note = note;
		_level = level;
	}
	
	/**
	 * @return the note
	 */
	public int getNote() {
		return _note;
	}
	
	/**
	 * @return the level
	 */
	public int getLevel() {
		return _level;
	}
}
